﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:DemoApp">

    <!-- DataTemplate for DesignerCanvas look and feel -->
    <DataTemplate DataType="{x:Type local:ComputationUnitViewModel}">
        <Grid>
            <Image IsHitTestVisible="False"
                   Stretch="Fill"
                   Source="../../Images/Persist.png"
                   Tag="setting" />
            <Button HorizontalAlignment="Right"
                    VerticalAlignment="Bottom"
                    Margin="5"
                    Template="{StaticResource infoButtonTemplate}" 
                    Command="{Binding ShowDataChangeWindowCommand}" />
            <TextBox Text="{Binding StrMethodNames}"
                     IsReadOnly="True"
                     VerticalAlignment="Bottom"
                     HorizontalAlignment="Center"
                     BorderBrush="Transparent"
                     Background="White"
                     Margin="-20"/>
        </Grid>
    </DataTemplate>

    <!-- DataTemplate for Popup look and feel -->
    <DataTemplate DataType="{x:Type local:ComputationUnitData}">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>

            <Label Grid.Row="0"
                   Content="Method Name"
                   Margin="5" />
            <TextBox Grid.Row="1"
                    HorizontalAlignment="Left"
                    Text="{Binding MethodName}"
                    Width="150"
                    Margin="5"
                    x:Name="TextBox"
                    FocusManager.FocusedElement="{Binding ElementName=TextBox}" />
            <TextBox Grid.Row="2"
                    HorizontalAlignment="Left"
                    Text="{Binding MethodCode}"
                    Width="150"
                    Margin="5"
                    Height="150"
                    x:Name="TextBoxCode" />
        </Grid>
    </DataTemplate>

</ResourceDictionary>